
fn isNodeMeshType pNode =
(
	if(pNode == undefined)do
		return false;
	
	local objectType = pNode.baseObject as string;
	return (objectType ==  "Editable Mesh" or objectType == "Editable Poly");
	
)

fn checkInsertAOLight =
(
	
	for lightSource in lights do
	(
		if isKindOf lightSource  Skylight then
			return OK
	)
	
	local newLight = SkyLight()
	return newLight
)

fn isNodeType szType pNode =
(
	if(pNode == undefined or szType == undefined)do
		return false;
	
	local objectType = pNode.baseObject as string;
	return (objectType ==  szType);
	
)